// 引入createSlice 创建reducer切片
import { createSlice } from "@reduxjs/toolkit";

const UserSlice = createSlice({
  name: "UserSlice",
  initialState: {
    token: "",
    userInfor: {},
  },
  reducers: {
    getToken() {},
    setToken() {},
  },
});

//导出action
export const { getToken, setToken } = UserSlice.actions;

//导出reducer
export default UserSlice.reducer;
